<template>
	<div class="m-window" v-loading="pageLoading" element-loading-text="数据加载中">
		<el-row :gutter="10" style="margin:8px auto;">
			<el-col :span="2" v-show="pageSourceCode == 'applyList' || pageCode == 'sign'">
				<el-button type="primary" @click="backtrack">返回</el-button>
			</el-col>
			<el-col
				:span="2"
				v-show="pageCode == 'signComplete'||(pageCode == 'orderSign'&&pageSourceCode != 'applyList')"
			>
				<el-button type="primary" @click="closetrack">关闭</el-button>
			</el-col>
		</el-row>
		<h2>
			流程编号：
			<b>{{processNumber}}</b>
		</h2>
		<el-row type="flex" justify="center" v-show="pageCode!='read'">
			<el-col :span="24">
				<el-steps :active="stepsActive" align-center finish-status="success">
					<el-step title="贵司签署"></el-step>
					<el-step title="金融签署"></el-step>
					<el-step title="签署完成"></el-step>
				</el-steps>
			</el-col>
		</el-row>
		<el-row>
			<el-col>
				<p v-if="pageCode=='read'">您有以下合同待阅读</p>
				<p v-else-if="pageCode=='orderSign'">
					<label class="t-label">请登录电子签平台签署以下合同：</label>
				</p>
				<p v-else>
					<label class="t-label">您有以下合同：</label>
				</p>
				<ul class="file-col" v-show="pageCode!='sign'&&pageCode!='orderSign'">
					<li v-for="(v,i) in previewContracts" :key="i">
						<a href="javascript:;">
							{{i+1}}.{{v.name}}
							<span v-show="v.companyName">(应付方：{{v.companyName}})</span>
						</a>
						<el-tag type="success" class="sign" v-show="v.signResult == 1">已签署</el-tag>
						<el-tag type="warning" class="sign" v-show="v.signResult == 0">待签署</el-tag>
						<el-button class="mini" @click="previewContract(v)">预览</el-button>
						<el-button class="mini" @click="downloadFile(v)">下载</el-button>
					</li>
				</ul>
				<el-checkbox-group v-model="form.contracts" v-show="pageCode == 'sign'">
					<ul class="file-col">
						<li v-for="(v,i) in contractList" :key="i">
							<el-checkbox :label="v" name="contracts" :disabled="v.signResult == 1||v.name=='《最高额保证合同》'">
								{{i+1}}.{{v.name}}
								<span v-show="v.companyName">(应付方：{{v.companyName}})</span>
							</el-checkbox>
							<el-tag type="success" class="sign" v-show="v.signResult == 1">已签署</el-tag>
							<el-tag type="warning" class="sign" v-show="v.signResult == 0">未签署</el-tag>
							<el-button class="mini" @click="previewContract(v)" :disabled="v.name=='《最高额保证合同》'">预览</el-button>
							<el-button class="mini" @click="downloadFile(v)">下载</el-button>
						</li>
					</ul>
				</el-checkbox-group>
				<div v-show="pageCode=='orderSign'">
					<ul class="file-col">
						<li v-for="(v,i) in contractList" :key="i">
							<a href="javascript:;">
								{{i+1}}.{{v.name}}
								<span v-show="v.companyName">(应付方：{{v.companyName}})</span>
							</a>
							<el-tag type="success" class="sign" v-show="v.signResult == 1">已签署</el-tag>
							<el-tag type="warning" class="sign" v-show="v.signResult == 0">待签署</el-tag>
							<!-- <el-button class="mini" @click="previewContract(v)" :disabled="v.name=='《最高额保证合同》'">预览</el-button>
							<el-button class="mini" @click="downloadFile(v)">下载</el-button>-->
						</li>
					</ul>
					<p style="color:red;margin:40px 0 0 140px">
						<a :href="esignUrl" target="blank" class="signBtn">签署合同</a>
					</p>
				</div>
			</el-col>
		</el-row>
		<el-row class="step1" v-show="pageCode == 'read'">
			<el-col>
				<el-checkbox label="已阅读并理解以上文件" name="type" v-model="isRead"></el-checkbox>
			</el-col>
			<el-col :span="2">
				<el-button type="primary" @click="nextStep">下一步</el-button>
			</el-col>
		</el-row>
		<el-row class="step2" v-show="pageCode == 'sign' && staySignContract.length > 0">
			<el-col style="margin-bottom:10px;">
				<div>
					请签署以下合同：
					<div v-for="(v,i) in staySignContract" :key="i" class="c-item">
						{{v.name}}
						<span v-show="v.companyName">(应付方：{{v.companyName}})</span>
					</div>
					<p style="color:red" v-if="finType==2||finType==3">
						注意:《最高额保证合同》需要担保人登录电子签平台签署。地址：
						<a
							:href="esignUrl"
							target="blank"
							style="color:#409eff"
						>{{esignUrl}}</a>
					</p>
				</div>
			</el-col>
			<el-col :span="2" v-show="pageCode!='orderSign'">
				<el-button type="primary" @click="sign">批量签署</el-button>
			</el-col>
		</el-row>
		<el-row class="step3" v-show="pageCode=='signComplete'">
			<el-col>
				<div>
					<label class="t-label">
						签署成功！以下是完成签署的合同
						<span v-show="stepsActive != 3">，下一步为深圳前海联塑商业保理公司 进行签署！！</span>
					</label>
					<div v-for="(v,i) in contractList" :key="i" class="c-item">
						{{v.name}}
						<span v-show="v.companyName">(应付方：{{v.companyName}})</span>
					</div>
				</div>
			</el-col>
		</el-row>
		<!-- 预览合同 -->
		<el-dialog
			title="合同预览"
			:visible.sync="previewDialogVisible"
			width="99%"
			class="contract-dialog"
			center
		>
			<div class="preview-col" v-loading="loading">
				<iframe :src="contractSrc" height="100%" width="100%" frameborder="0"></iframe>
			</div>
		</el-dialog>
		<!-- 签署验证码 -->
		<el-dialog
			class="sign-dialog"
			title="签署校验"
			:visible.sync="signDialogVisible"
			width="30%"
			center
			:closeOnClickModal="false"
		>
			<el-row type="flex" justify="center" style="flex-direction: column;width: 250px;margin: auto;">
				<el-col class="phonenumber-col">
					<label>手机号：{{phoneNumber}}</label>
				</el-col>
				<el-col class="verify-col">
					<label>验证码：</label>
					<input type="text" v-model.trim="vCode" />
					<el-button
						@click="acquireVerifyCode"
						class="getverifycode-btn"
						:disabled="!isMayGet"
					>{{verifyCodeBtnText}}</el-button>
				</el-col>
			</el-row>
			<el-row type="flex" justify="center">
				<el-col :span="5">
					<el-button type="primary" @click="onSubmit" style="margin-top:30px;">确认</el-button>
				</el-col>
			</el-row>
		</el-dialog>
	</div>
</template>
<style>
.msg-hint-w {
	width: 500px !important;
}
.msg-hint-wx {
	width: 600px !important;
}
.msg-hint-mx {
	width: 300px !important;
}
.msg-hint .el-message-box__header {
	display: block;
}

.msg-hint .el-message-box__title {
	text-align: left;
}

.msg-hint .el-message-box__message p {
	text-align: left !important;
	word-break: break-all;
}
.msg-hint .el-message-box__content {
	align-items: center;
	display: flex;
	flex-direction: row;
	justify-content: center;
}
.msg-hint .el-message-box__content .el-message-box__status {
	position: initial;
	transform: initial;
}
.msg-hint .el-message-box__status + .el-message-box__message {
	padding-left: 20px;
}
.msg-hint .el-message-box__btns .cancel-btn {
	float: right;
	padding: 7px 15px;
	width: 50px;
	border-color: #ccc;
	color: #565656;
	background: #f2f2f1;
}

.msg-hint .el-message-box__btns .confirm-btn {
	float: right;
	padding: 7px 15px;
	width: 100px;
	margin-right: 12px;
}
</style>

<style lang="less" scoped>
.m-window {
	overflow: auto;
	overflow-x: hidden;
	/deep/.el-button.getverifycode-btn[disabled] {
		color: #565656 !important;
	}
	.c-item {
		margin: 10px 0;
	}
	.t-label {
		font-size: 14px;
		font-weight: 600;
		color: #565656;
	}
	.contract-dialog {
		/deep/ .el-dialog {
			height: 86%;
			.el-dialog__body {
				height: 90%;
				padding: 0 !important;
				margin: 15px 0 !important;
			}
		}
		.preview-col {
			height: 100%;
			width: 100%;
		}
	}
	.file-col {
		padding-left: 20px;
		li {
			margin: 10px 0;
			/deep/.el-checkbox {
				line-height: 10px;
			}
			a {
				text-decoration: none;
			}
		}
	}
	.signBtn {
		color: #fff;
		padding: 10px 16px;
		background: #0c82d7;
		cursor: pointer;
		border-radius: 4px;
	}
	/deep/.el-button.mini {
		height: 20px !important;
		width: 50px !important;
		line-height: 20px !important;
		padding: 0 !important;
	}
	.sign-dialog {
		.phonenumber-col {
			margin-bottom: 10px;
			display: block;
		}
		.verify-col {
			display: flex;
			flex-direction: row;
			input {
				display: block;
				width: 100px;
				border: none;
				outline-style: none;
				border-bottom: 1px solid #ccc;
			}
			/deep/.el-button {
				height: 20px !important;
				width: 80px !important;
				line-height: 20px !important;
				padding: 0 !important;
				margin-left: 8px;
			}
		}
	}
	.sign {
		height: 20px;
		width: 50px;
		line-height: 20px;
		text-align: center;
		margin: 0 10px;
		padding: 0;
	}
}
</style>

<script>
import { mapState, mapActions } from "vuex";
import { showAlert } from "lesso-common/public/utils";
import downloadFile from "@/util/fileDownload.js";
import eventBus from "@/util/event-bus";
import constant from "@/public/constant";
export default {
	props: {
		applyId: String,
		pageSourceCode: String,
		finType: {
			type: String
		}
	},
	data () {
		return {
			env: "dev", //系统当前运行环境,默认开发
			form: {
				contracts: []
			},
			previewDialogVisible: false,
			signDialogVisible: false,
			phoneNumber: "",
			verifyCodeBtnText: "获取验证码",
			pageCode: "read", //阅读 read 、签署 sign、签署完成 signComplete
			loading: false,
			contractReadNum: 0,
			stepsActive: 0,
			isRead: false,
			account: "",
			checkTab: "",
			processNumber: "",
			contractSrc: "",
			contractList: [],
			alreadyContract: [],
			vCode: "",
			docIdList: [],
			isSign: false,
			timer: null,
			isMayGet: true,
			isPartSign: false,
			pageLoading: true,
			previewContracts: [],
			esignUrl: ''
		};
	},
	created () {
		this.env = constant.appenv; //对应的是运行环境（开发，测试，正式）
		this.account = this.supplyChainFinance.custInf.eSignAccount;
		this.loadContract();
		this.esignUrl = constant.appenv == 'app' ? 'https://esign.lesso.com/esign' : 'https://esign.lesso.com/testesign'
	},
	mounted () {
		eventBus.$on("closeTab", tab => {
			if (
				this.isSign == false &&
				(tab.content == "applyList" &&
					this.supplierApplyList.pageCode == "signPreview")
			) {
				showAlert({
					msg: `提示：您的合同尚未签署！`,
					type: 2
				});
			}
		});
	},
	watch: {
		isRead: function (val, oldVal) {
			let notSignedContracts = this.previewContracts.filter(v => v.signResult == 0);
			if (this.alreadyContract.length < notSignedContracts.length) {
				this.isRead = false;
				let notReadContracts = "";
				for (let i = 0, data = notSignedContracts; i < data.length; i++) {
					let d = data[i];
					if (
						!this.alreadyContract.includes(
							`${d.name}(应付方：${d.companyName})`
						)
					) {
						let fullName = d.companyName
							? `${d.name}(应付方：${d.companyName})`
							: d.name;
						notReadContracts = `${notReadContracts} <p>${fullName}</p>`;
					}
				}
				if (notReadContracts != "") {
					this.$confirm(
						`&nbsp;&nbsp;您还有以下合同，未阅读：${notReadContracts}`,
						"提示",
						{
							confirmButtonText: "确认",
							dangerouslyUseHTMLString: true,
							type: "warning",
							customClass: "msg-hint msg-hint-w",
							showCancelButton: false,
							center: false
						}
					)
						.then(() => { })
						.catch(() => { });
				}
			}
		},
		signDialogVisible: function (val, oldVal) {
			if (!val) {
				clearInterval(this.timer);
				this.verifyCodeBtnText = "获取验证码";
				this.isMayGet = true;
			}
		}
	},
	computed: {
		...mapState(["supplierApplyList", "supplyChainFinance"]),
		staySignContract () {
			return this.contractList.filter(v => v.signResult == 0)
		}
	},
	methods: {
		...mapActions(["changeTOdo", "changePageCode", "changeMyProcessedCTCode"]),
		async getApplyActivity () {
			let that = this;
			await that.$http
				.getApplyActivity({ applyId: this.applyId })
				.then(({ data }) => {
					if (data.code == 200) {
						if (
							data.rows && data.rows.code == "act_fin_review_reg" ||
							data.rows.code == "act_fin_loan" ||
							data.rows.code == "act_fin_long_review" ||
							data.rows.code == "act_cust_repay"
						) {
							that.stepsActive = 3;
							that.isSign = true
							that.pageCode = "signComplete"
						}
					} else {
						that.$alert("获取申请表流程信息失败", {
							confirmButtonText: "确定",
							customClass: "alertFailure"
						});
					}
				})
				.catch(errror => {
					this.pageLoading = false
					that.$alert("获取申请表流程信息失败，请检查网络！", {
						confirmButtonText: "确定",
						customClass: "alertFailure"
					});
				});
		},
		//查询合同是否签署
		async validatesSignedContract () {
			let that = this;
			await this.$http
				.validatesSignedContract({
					applyId: this.applyId,
					eSignAccount: this.account
				})
				.then(({ data }) => {
					that.isSign = data.code == 200 ? true : false;
					that.pageCode = data.code == 200 ? "signComplete" : "read";
					if (data.code == 200) {
						that.stepsActive = 1;
					}
				})
				.catch(error => {
					this.$alert("查询是否签署失败，请检查网络！", {
						confirmButtonText: "确定",
						customClass: "alertFailure"
					});
				});
		},
		//获取验证码
		async getVerifyCode () {
			let that = this;
			await this.$http
				.getVerifyCode({
					applyId: this.applyId,
					eSignAccount: this.account
				})
				.then(({ data }) => {
					if (data.code == 200) {
						//            showAlert({
						//              msg: `${data.info}`,
						//              type: 1
						//            });
						that.$message({
							message: data.info,
							type: 'success',
							center: true
						});
						let second = 120;
						clearInterval(that.timer);
						that.timer = setInterval(function () {
							if (second > 1) {
								that.verifyCodeBtnText = `${--second}秒后失效`;
							} else {
								clearInterval(that.timer);
								that.verifyCodeBtnText = "重新获取";
								that.isMayGet = true;
							}
						}, 1000);
					} else {
						that.isMayGet = true;
						showAlert({
							msg: data.info,
							type: 0
						});
					}
				})
				.catch(error => {
					//          this.isMayGet = true;
					//          showAlert({
					//            msg: "发送验证码失败，请检查网络！",
					//            type: 0
					//          });
					that.$message({
						message: data.info,
						type: 'warning',
						center: true
					});
				});
		},
		//获取合同数据
		async loadContract (docId) {
			this.loading = true;
			let that = this;
			let param = {
				account: this.account,
				applyId: this.applyId
			};
			this.pageLoading = docId ? false : true;
			await this.$http
				.createToken(param)
				.then(({ data }) => {
					if (data.code == 200 && data.rows.contractList) {
						let token = data.rows.token;
						this.previewContracts = data.rows.contractList.filter(item =>
							item.name !== '《最高额保证合同》'
						)
						this.phoneNumber = data.rows.contractList[0]["mobile"];
						let alreadySignContract = data.rows.contractList.filter(v => v.signResult == 1)
						this.isPartSign = alreadySignContract.length > 0;
						if (docId) {
							data.rows.contractList.forEach(function (value, index, array) {
								if (value.docId == docId) {
									if (that.env == "app") {
										that.contractSrc = `https://esign.lesso.com/esign/SSOSign/SignLogin?param=${token}&url=https://esign.lesso.com/Esign/Sign/indexView?doc_id=${
											value.docId
											}`;
									} else {
										that.contractSrc = `https://esign.lesso.com/testesign/SSOSign/SignLogin?param=${token}&url=https://esign.lesso.com/TestEsign/Sign/indexView?doc_id=${
											value.docId
											}`;
									}
								}
							});
						} else {
							that.processNumber =
								data.rows.contractList.length > 0
									? data.rows.contractList[0]["itemNo"]
									: "";
							that.contractList = data.rows.contractList || [];
							that.form.contracts = [];
							let notSignedContracts = data.rows.contractList.filter(
								v => v.signResult == 0 && v.name !== '《最高额保证合同》'
							);
							if (alreadySignContract.length == that.contractList.length) {
								that.isSign = true
								that.pageCode = "signComplete"
								that.stepsActive = 1
							} else if (alreadySignContract.length == 0) {
								that.isSign = false
								if (that.finType == 2 || that.finType == 3) {
									that.pageCode = "orderSign"
								} else {
									that.pageCode = "read"
								}
							} else if (alreadySignContract.length > 0) {
								that.isSign = false
								if (that.finType == 2 || that.finType == 3) {
									that.pageCode = "orderSign"
								} else {
									that.pageCode = "sign"
								}
							}
							//未签署合同默认全部勾选
							notSignedContracts.map((v, i) => {
								if (i < 3) {
									that.form.contracts.push(v);
								}
							});
							that.getApplyActivity()
						}
					}
					setTimeout(function () {
						that.loading = false;
						that.pageLoading = false
					}, 600);
				})
				.catch(error => {
					this.$alert("查询合同数据失败，请检查网络！", {
						confirmButtonText: "确定",
						customClass: "alertFailure"
					});
				});
		},
		//一键签署合同
		async oneKeySignContract () {
			const loading = this.$loading({
				lock: true,
				text: "合同签署中，请稍等",
				spinner: "el-icon-loading",
				background: "rgba(255,255,255,.9)"
			});
			let parame = {
				applyId: this.applyId,
				vCode: this.vCode,
				docIdList: this.docIdList,
				eSignAccount: this.account
			};
			await this.$http
				.oneKeySignContract(parame)
				.then(({ data }) => {
					this.loadContract();
					let that = this;
					setTimeout(function () {
						loading.close();
						that.vCode = "";
						let msgHtml = "";
						if (data.info) {
							let msgSplit = data.info.replace("合同签署详情：", "").split(";");
							if (msgSplit.length > 1) {
								msgSplit.map((v, i) => {
									msgHtml += `<p>${v}</p>`;
								});
							}
						}
						msgHtml =
							msgHtml != ""
								? `&nbsp;&nbsp;<span>合同签署详情：</span> ${msgHtml}`
								: data.info;
						if (data.code == 200) {
							that.isMayGet = true;
							clearInterval(that.timer);
							that.signDialogVisible = false;
							that.verifyCodeBtnText = "重新获取";
							if (
								that.contractList.filter(v => v.signResult == 1).length ==
								that.contractList.length
							) {
								that.pageCode = "signComplete";
								that.stepsActive = 1;
								that.isSign = true;
							}
							that
								.$confirm(msgHtml, "提示", {
									confirmButtonText: "确认",
									dangerouslyUseHTMLString: true,
									type: "success",
									customClass: "msg-hint msg-hint-wx",
									showCancelButton: false,
									center: false
								})
								.then(() => { })
								.catch(() => { });
						} else {
							let customCls = "msg-hint msg-hint-wx";
							if (msgHtml && msgHtml.includes("验证码")) {
								customCls = customCls + " msg-hint-mx";
							}
							that
								.$confirm(msgHtml, "提示", {
									confirmButtonText: "确认",
									dangerouslyUseHTMLString: true,
									type: "error",
									customClass: customCls,
									showCancelButton: false,
									center: false
								})
								.then(() => { })
								.catch(() => { });
						}
					}, 1500);
				})
				.catch(error => {
					this.isMayGet = true;
					clearInterval(this.timer);
					this.verifyCodeBtnText = "重新获取";
					loading.close();
					showAlert({
						msg: "签署合同失败，请检查网络！",
						type: 0
					});
				});
		},
		onSubmit () {
			if (!this.vCode) {
				showAlert({
					msg: "验证码不能为空",
					type: 2
				});
				return;
			}
			this.$confirm(
				"请确认您已检阅合同无误，一经签署即产生相应法律效力!",
				"温馨提示",
				{
					confirmButtonText: "已检验无误",
					cancelButtonText: "否",
					confirmButtonClass: "confirm-btn",
					cancelButtonClass: "cancel-btn",
					type: "warning",
					customClass: "msg-hint",
					center: false
				}
			)
				.then(() => {
					this.oneKeySignContract();
				})
				.catch(() => { });
		},
		//获取验证码
		acquireVerifyCode () {
			this.verifyCodeBtnText = "重新获取";
			this.isMayGet = false;
			this.getVerifyCode();
		},
		//下载合同文件
		downloadFile (v) {
			this.fileDownload(v.name, v.path);
		},
		//签署
		sign () {
			let isExist = false;
			let contracts = this.form.contracts;
			if (Array.isArray(this.staySignContract) && this.staySignContract.length == 1) {
				if (this.staySignContract[0].name == '《最高额保证合同》') {
					showAlert({
						msg: "《最高额保证合同》需担保人登录电子签系统签署",
						type: 2
					});
					return;
				}
			}
			if (contracts.length == 0) {
				showAlert({
					msg: "请勾选要签署的合同",
					type: 2
				});
				return;
			}
			if (contracts.length > 3) {
				showAlert({
					msg: "批量签署，勾选不能超过3个合同",
					type: 2
				});
				return;
			}
			this.docIdList = [];
			let blfwhtDocId = ""; //《保理服务合同》docId
			for (let i = 0; i < contracts.length; i++) {
				if (contracts[i].name == "《保理服务合同》") {
					isExist = true;
					blfwhtDocId = contracts[i].docId;
				} else {
					this.docIdList.push(contracts[i].docId);
				}
			}
			if (blfwhtDocId) {
				this.docIdList.unshift(blfwhtDocId);
			}
			if (this.isPartSign == false && !isExist) {
				showAlert({
					msg: "首次签署必须勾选“保理服务合同”",
					type: 2
				});
				return;
			}
			this.verifyCodeBtnText = "获取验证码";
			this.vCode = "";
			this.signDialogVisible = true;
		},
		//预览合同
		previewContract (v) {
			if (
				!this.alreadyContract.includes(`${v.name}(应付方：${v.companyName})`)
			) {
				//this.docIdList.push(v.docId)
				this.alreadyContract.push(`${v.name}(应付方：${v.companyName})`);
			}
			this.contractSrc = "about:blank";
			this.loadContract(v.docId);
			this.previewDialogVisible = true;
		},
		//下一步
		nextStep () {
			if (!this.isRead) {
				showAlert({
					msg: "请勾选“已阅读并理解以上文件”",
					type: 2
				});
				return;
			}
			this.pageCode = "sign";
			this.stepsActive = 0;
		},
		//返回
		backtrack () {
			//阅读 read 、签署 sign、签署完成 signComplete
			if (this.pageCode == "sign" && this.pageSourceCode != "applyList") {
				this.pageCode = "read"
			} else if (!this.isSign) {
				this.$confirm("您尚有合同未签署，确认离开吗？", {
					confirmButtonText: "确定",
					cancelButtonText: "取消"
				})
					.then(() => {
						if (this.pageSourceCode == "applyList") {
							this.changePageCode("");
						}
					})
					.catch(() => { });
			} else {
				this.changePageCode("")
			}
		},
		fileDownload (filename, url) {
			var group = ''
			if (url.indexOf('SRM') > -1) {
				group = 'SRM'
			} else if (url.indexOf('SIGN') > -1) {
				group = 'SIGN'
			} else if (url.indexOf('TEST') > -1) {
				group = 'TEST'
			} else if (url.indexOf('MES') > -1) {
				group = 'MES'
			}
			let params = {
				'viewPath': group + `${url.split(group)[1]}`,
				'groupName': group,
				'fileName': filename
			}
			console.log('参数', params)
			downloadFile(params, filename + '.pdf')
			//   this.$http
			//     .getFullFilePath({
			//       url: url
			//     })
			//     .then(({ data }) => {
			//       if (data.code == 200) {
			//         download(`${filename}.pdf`, data.rows[0].fileName);
			//       } else {
			//         showAlert({
			//           msg: `${data.info}`,
			//           type: 0
			//         });
			//       }
			//     })
			//     .catch(error => {
			//       showAlert({
			//         msg: `下载文件失败，请检查网络！`,
			//         type: 0
			//       });
			//     });
		},
		closetrack () {
			this.changePageCode("");
			this.$tap.$emit("removeTabFn");
			this.$tap.$emit("addTabFn", {
				cName: "我的申请",
				name: "applyList",
				completed: false,
			});
		}
	}
};
</script>